<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>spade.xmpp.protocol.Error</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="spade-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://spade2.googlecode.com">SPADE</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="spade-module.html">Package&nbsp;spade</a> ::
        <a href="spade.xmpp-module.html">Package&nbsp;xmpp</a> ::
        <a href="spade.xmpp.protocol-module.html">Module&nbsp;protocol</a> ::
        Class&nbsp;Error
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="spade.xmpp.protocol.Error-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Error</h1><p class="nomargin-top"><span class="codelink"><a href="spade.xmpp.protocol-pysrc.html#Error">source&nbsp;code</a></span></p>
<center>
<center>  <map id="uml_class_diagram_for_spade_xm_22" name="uml_class_diagram_for_spade_xm_22">
<area shape="rect" id="node2534" href="spade.xmpp.protocol.Error-class.html#__init__" title="Create error reply basing on the received &#39;node&#39; stanza and the &#39;error&#39; &#160;error condition." alt="" coords="129,729,380,748"/>
<area shape="rect" id="node2534" href="spade.xmpp.protocol.Error-class.html#__dupstr__" title="Dummy function used as preventor of creating error node in reply to error &#160;node." alt="" coords="129,748,380,767"/>
<area shape="rect" id="node1" href="spade.xmpp.protocol.Error-class.html" title="Used to quickly transform received stanza into error reply." alt="" coords="117,697,392,773"/>
<area shape="rect" id="node2535" href="spade.xmpp.protocol.Protocol-class.html#getTo" title="Return value of the &#39;to&#39; attribute." alt="" coords="159,391,351,409"/>
<area shape="rect" id="node2535" href="spade.xmpp.protocol.Protocol-class.html#getFrom" title="Return value of the &#39;from&#39; attribute." alt="" coords="159,409,351,428"/>
<area shape="rect" id="node2535" href="spade.xmpp.protocol.Protocol-class.html#getTimestamp" title="Return the timestamp in the &#39;yyyymmddThhmmss&#39; format." alt="" coords="159,428,351,447"/>
<area shape="rect" id="node2535" href="spade.xmpp.protocol.Protocol-class.html#getID" title="Return the value of the &#39;id&#39; attribute." alt="" coords="159,447,351,465"/>
<area shape="rect" id="node2535" href="spade.xmpp.protocol.Protocol-class.html#setTo" title="Set the value of the &#39;to&#39; attribute." alt="" coords="159,465,351,484"/>
<area shape="rect" id="node2535" href="spade.xmpp.protocol.Protocol-class.html#getType" title="Return the value of the &#39;type&#39; attribute." alt="" coords="159,484,351,503"/>
<area shape="rect" id="node2535" href="spade.xmpp.protocol.Protocol-class.html#setFrom" title="Set the value of the &#39;from&#39; attribute." alt="" coords="159,503,351,521"/>
<area shape="rect" id="node2535" href="spade.xmpp.protocol.Protocol-class.html#setType" title="Set the value of the &#39;type&#39; attribute." alt="" coords="159,521,351,540"/>
<area shape="rect" id="node2535" href="spade.xmpp.protocol.Protocol-class.html#setID" title="Set the value of the &#39;id&#39; attribute." alt="" coords="159,540,351,559"/>
<area shape="rect" id="node2535" href="spade.xmpp.protocol.Protocol-class.html#getError" title="Return the error&#45;condition (if present) or the textual description of the &#160;error (otherwise)." alt="" coords="159,559,351,577"/>
<area shape="rect" id="node2535" href="spade.xmpp.protocol.Protocol-class.html#getErrorCode" title="Return the error code." alt="" coords="159,577,351,596"/>
<area shape="rect" id="node2535" href="spade.xmpp.protocol.Protocol-class.html#setError" title="Set the error code." alt="" coords="159,596,351,615"/>
<area shape="rect" id="node2535" href="spade.xmpp.protocol.Protocol-class.html#setTimestamp" title="Set the timestamp." alt="" coords="159,615,351,633"/>
<area shape="rect" id="node2535" href="spade.xmpp.protocol.Protocol-class.html#getProperties" title="Return the list of namespaces to which belongs the direct childs of element" alt="" coords="159,633,351,652"/>
<area shape="rect" id="node2535" href="spade.xmpp.protocol.Protocol-class.html#__setitem__" title="Set the item &#39;item&#39; to the value &#39;val&#39;." alt="" coords="159,652,351,671"/>
<area shape="rect" id="node2" href="spade.xmpp.protocol.Protocol-class.html" title="A &quot;stanza&quot; object class." alt="" coords="147,358,363,677"/>
<area shape="rect" id="node2536" href="spade.xmpp.simplexml.Node-class.html#FORCE_NODE_RECREATION" title="spade.xmpp.simplexml.Node.FORCE_NODE_RECREATION" alt="" coords="17,31,492,49"/>
<area shape="rect" id="node2536" href="spade.xmpp.simplexml.Node-class.html#__delitem__" title="Deletes node&#39;s attribute &quot;item&quot;." alt="" coords="17,52,492,71"/>
<area shape="rect" id="node2536" href="spade.xmpp.simplexml.Node-class.html#__getattr__" title="Reduce memory usage caused by T/NT classes &#45; use memory only when needed." alt="" coords="17,71,492,89"/>
<area shape="rect" id="node2536" href="spade.xmpp.simplexml.Node-class.html#__getitem__" title="Returns node&#39;s attribute &quot;item&quot; value." alt="" coords="17,89,492,108"/>
<area shape="rect" id="node2536" href="spade.xmpp.simplexml.Node-class.html#__str__" title="Method used to dump node into textual representation." alt="" coords="17,108,492,127"/>
<area shape="rect" id="node2536" href="spade.xmpp.simplexml.Node-class.html#addChild" title="If &quot;node&quot; argument is provided, adds it as child node." alt="" coords="17,127,492,145"/>
<area shape="rect" id="node2536" href="spade.xmpp.simplexml.Node-class.html#addData" title="Adds some CDATA to node." alt="" coords="17,145,492,164"/>
<area shape="rect" id="node2536" href="spade.xmpp.simplexml.Node-class.html#clearData" title="Removes all CDATA from the node." alt="" coords="17,164,492,183"/>
<area shape="rect" id="node2536" href="spade.xmpp.simplexml.Node-class.html#delAttr" title="Deletes an attribute &quot;key&quot;" alt="" coords="17,183,492,201"/>
<area shape="rect" id="node2536" href="spade.xmpp.simplexml.Node-class.html#delChild" title="Deletes the &quot;node&quot; from the node&#39;s childs list, if &quot;node&quot; is an instance." alt="" coords="17,201,492,220"/>
<area shape="rect" id="node2536" href="spade.xmpp.simplexml.Node-class.html#getAttr" title="Returns value of specified attribute." alt="" coords="17,220,492,239"/>
<area shape="rect" id="node2536" href="spade.xmpp.simplexml.Node-class.html#getAttrs" title="Returns all node&#39;s attributes as dictionary." alt="" coords="17,239,492,257"/>
<area shape="rect" id="node2536" href="spade.xmpp.simplexml.Node-class.html#getChildren" title="Returns all node&#39;s child nodes as list." alt="" coords="17,257,492,276"/>
<area shape="rect" id="node2536" href="spade.xmpp.simplexml.Node-class.html#getData" title="Returns all node CDATA as string (concatenated)." alt="" coords="17,276,492,295"/>
<area shape="rect" id="node2536" href="spade.xmpp.simplexml.Node-class.html#setTagData" title="Creates new node (if not already present) with name &quot;tag&quot; and (optionally) &#160;attributes &quot;attrs&quot; and sets it&#39;s CDATA to string &quot;val&quot;." alt="" coords="17,313,492,332"/>
<area shape="rect" id="node3" href="spade.xmpp.simplexml.Node-class.html" title="Node class describes syntax of separate XML Node." alt="" coords="5,6,504,338"/>
</map>
  <img src="uml_class_diagram_for_spade_xm_22.gif" alt='' usemap="#uml_class_diagram_for_spade_xm_22" ismap="ismap" class="graph-without-title" />
</center>
</center>
<hr />
<p>Used to quickly transform received stanza into error reply.</p>

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="spade.xmpp.protocol.Error-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">node</span>,
        <span class="summary-sig-arg">error</span>,
        <span class="summary-sig-arg">reply</span>=<span class="summary-sig-default">1</span>)</span><br />
      Create error reply basing on the received 'node' stanza and the 
      'error' error condition.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="spade.xmpp.protocol-pysrc.html#Error.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="spade.xmpp.protocol.Error-class.html#__dupstr__" class="summary-sig-name">__dupstr__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">dup1</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">dup2</span>=<span class="summary-sig-default">None</span>)</span><br />
      Dummy function used as preventor of creating error node in reply to 
      error node.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="spade.xmpp.protocol-pysrc.html#Error.__dupstr__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="spade.xmpp.protocol.Protocol-class.html">Protocol</a></code></b>:
      <code><a href="spade.xmpp.protocol.Protocol-class.html#__setitem__">__setitem__</a></code>,
      <code><a href="spade.xmpp.protocol.Protocol-class.html#getError">getError</a></code>,
      <code><a href="spade.xmpp.protocol.Protocol-class.html#getErrorCode">getErrorCode</a></code>,
      <code><a href="spade.xmpp.protocol.Protocol-class.html#getFrom">getFrom</a></code>,
      <code><a href="spade.xmpp.protocol.Protocol-class.html#getID">getID</a></code>,
      <code><a href="spade.xmpp.protocol.Protocol-class.html#getProperties">getProperties</a></code>,
      <code><a href="spade.xmpp.protocol.Protocol-class.html#getTimestamp">getTimestamp</a></code>,
      <code><a href="spade.xmpp.protocol.Protocol-class.html#getTo">getTo</a></code>,
      <code><a href="spade.xmpp.protocol.Protocol-class.html#getType">getType</a></code>,
      <code><a href="spade.xmpp.protocol.Protocol-class.html#setError">setError</a></code>,
      <code><a href="spade.xmpp.protocol.Protocol-class.html#setFrom">setFrom</a></code>,
      <code><a href="spade.xmpp.protocol.Protocol-class.html#setID">setID</a></code>,
      <code><a href="spade.xmpp.protocol.Protocol-class.html#setTimestamp">setTimestamp</a></code>,
      <code><a href="spade.xmpp.protocol.Protocol-class.html#setTo">setTo</a></code>,
      <code><a href="spade.xmpp.protocol.Protocol-class.html#setType">setType</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="spade.xmpp.simplexml.Node-class.html">simplexml.Node</a></code></b>:
      <code><a href="spade.xmpp.simplexml.Node-class.html#__delitem__">__delitem__</a></code>,
      <code><a href="spade.xmpp.simplexml.Node-class.html#__getattr__">__getattr__</a></code>,
      <code><a href="spade.xmpp.simplexml.Node-class.html#__getitem__">__getitem__</a></code>,
      <code><a href="spade.xmpp.simplexml.Node-class.html#__str__">__str__</a></code>,
      <code><a href="spade.xmpp.simplexml.Node-class.html#addChild">addChild</a></code>,
      <code><a href="spade.xmpp.simplexml.Node-class.html#addData">addData</a></code>,
      <code><a href="spade.xmpp.simplexml.Node-class.html#clearData">clearData</a></code>,
      <code><a href="spade.xmpp.simplexml.Node-class.html#delAttr">delAttr</a></code>,
      <code><a href="spade.xmpp.simplexml.Node-class.html#delChild">delChild</a></code>,
      <code><a href="spade.xmpp.simplexml.Node-class.html#getAttr">getAttr</a></code>,
      <code><a href="spade.xmpp.simplexml.Node-class.html#getAttrs">getAttrs</a></code>,
      <code><a href="spade.xmpp.simplexml.Node-class.html#getChildren">getChildren</a></code>,
      <code><a href="spade.xmpp.simplexml.Node-class.html#getData">getData</a></code>,
      <code><a href="spade.xmpp.simplexml.Node-class.html#getName">getName</a></code>,
      <code><a href="spade.xmpp.simplexml.Node-class.html#getNamespace">getNamespace</a></code>,
      <code><a href="spade.xmpp.simplexml.Node-class.html#getParent">getParent</a></code>,
      <code><a href="spade.xmpp.simplexml.Node-class.html#getPayload">getPayload</a></code>,
      <code><a href="spade.xmpp.simplexml.Node-class.html#getTag">getTag</a></code>,
      <code><a href="spade.xmpp.simplexml.Node-class.html#getTagAttr">getTagAttr</a></code>,
      <code><a href="spade.xmpp.simplexml.Node-class.html#getTagData">getTagData</a></code>,
      <code><a href="spade.xmpp.simplexml.Node-class.html#getTags">getTags</a></code>,
      <code><a href="spade.xmpp.simplexml.Node-class.html#has_attr">has_attr</a></code>,
      <code><a href="spade.xmpp.simplexml.Node-class.html#setAttr">setAttr</a></code>,
      <code><a href="spade.xmpp.simplexml.Node-class.html#setData">setData</a></code>,
      <code><a href="spade.xmpp.simplexml.Node-class.html#setName">setName</a></code>,
      <code><a href="spade.xmpp.simplexml.Node-class.html#setNamespace">setNamespace</a></code>,
      <code><a href="spade.xmpp.simplexml.Node-class.html#setParent">setParent</a></code>,
      <code><a href="spade.xmpp.simplexml.Node-class.html#setPayload">setPayload</a></code>,
      <code><a href="spade.xmpp.simplexml.Node-class.html#setTag">setTag</a></code>,
      <code><a href="spade.xmpp.simplexml.Node-class.html#setTagAttr">setTagAttr</a></code>,
      <code><a href="spade.xmpp.simplexml.Node-class.html#setTagData">setTagData</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="spade.xmpp.simplexml.Node-class.html">simplexml.Node</a></code></b>:
      <code><a href="spade.xmpp.simplexml.Node-class.html#FORCE_NODE_RECREATION">FORCE_NODE_RECREATION</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">node</span>,
        <span class="sig-arg">error</span>,
        <span class="sig-arg">reply</span>=<span class="sig-default">1</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="spade.xmpp.protocol-pysrc.html#Error.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Create error reply basing on the received 'node' stanza and the 
  'error' error condition. If the 'node' is not the received stanza but 
  locally created ('to' and 'from' fields needs not swapping) specify the 
  'reply' argument as false.</p>
  <dl class="fields">
    <dt>Overrides:
        <a href="spade.xmpp.simplexml.Node-class.html#__init__">simplexml.Node.__init__</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__dupstr__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__dupstr__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">dup1</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">dup2</span>=<span class="sig-default">None</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="spade.xmpp.protocol-pysrc.html#Error.__dupstr__">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Dummy function used as preventor of creating error node in reply to 
  error node. I.e. you will not be able to serialise &quot;double&quot; 
  error into string.</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="spade-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://spade2.googlecode.com">SPADE</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Wed Aug  1 18:44:57 2012
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
